package com.shw.service.Impl;
import java.util.List;
import com.shw.mapper.UserMapper;
import com.shw.bean.User;
import com.shw.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;
    @Override
    public long getUserRowCount(){
        return userMapper.getUserRowCount();
    }
    @Override
    public List<User> selectUser(){
        return userMapper.selectUser();
    }
    @Override
    public User selectUserByObj(User obj){
        return userMapper.selectUserByObj(obj);
    }
    @Override
    public User selectUserById(Integer id){
        return userMapper.selectUserById(id);
    }
    @Override
    public int insertUser(User value){
        return userMapper.insertUser(value);
    }
    @Override
    public int insertNonEmptyUser(User value){
        return userMapper.insertNonEmptyUser(value);
    }
    @Override
    public int insertUserByBatch(List<User> value){
        return userMapper.insertUserByBatch(value);
    }
    @Override
    public int deleteUserById(Integer id){
        return userMapper.deleteUserById(id);
    }
    @Override
    public int updateUserById(User enti){
        return userMapper.updateUserById(enti);
    }
    @Override
    public int updateNonEmptyUserById(User enti){
        return userMapper.updateNonEmptyUserById(enti);
    }

    @Override
    public User selectUserByUsername(String username) {
        return userMapper.selectUserByUsername(username);
    }

    public UserMapper getUserMapper() {
        return this.userMapper;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

}